package com.daxia.ogmall.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.springframework.format.annotation.DateTimeFormat;

/**
 * UserTaskRecord
 */
@Entity
@Table(name = "usertaskrecord") 
public class UserTaskRecord extends BaseModel {
	/**
	 * id
	 */
	@Id
	@GeneratedValue
	@Column(name = "id")
    private Long id;
	/**
	 * 任务
	 */
	@ManyToOne
	@JoinColumn(name = "task_id")
    private Task task;
	/**
	 * 用户
	 */
	@ManyToOne
	@JoinColumn(name = "user_id")
    private User user;
	/**
	 * 详情
	 */
	@Column(name = "details")
    private String details;
	/**
	 * 首图
	 */
	@Column(name = "headImage")
    private String headImage;
	/**
	 * 图片
	 */
	@Column(name = "images")
    private String images;
	/**
	 * 创建时间
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@Column(name = "createTime")
    private Date createTime;
	
	public Long getId() {
    	return id;
    }
	
    public void setId(Long id) {
    	this.id = id;
    }
	
	public Task getTask() {
    	return task;
    }
	
    public void setTask(Task task) {
    	this.task = task;
    }
	
	public User getUser() {
    	return user;
    }
	
    public void setUser(User user) {
    	this.user = user;
    }
	
	public String getDetails() {
    	return details;
    }
	
    public void setDetails(String details) {
    	this.details = details;
    }
	
	public String getHeadImage() {
    	return headImage;
    }
	
    public void setHeadImage(String headImage) {
    	this.headImage = headImage;
    }
	
	public String getImages() {
    	return images;
    }
	
    public void setImages(String images) {
    	this.images = images;
    }
	
	public Date getCreateTime() {
    	return createTime;
    }
	
    public void setCreateTime(Date createTime) {
    	this.createTime = createTime;
    }
	
}
